package mrusanov.util.swing

import javax.swing.{ JComponent, JPanel }
import net.miginfocom.swing.MigLayout

class HolderPanel[T <: JPanel] extends JPanel {
	private var _child: T = _

	setLayout(new MigLayout("fill"))

	def child = _child
	def child_=(child: T) {
		removeAll()
		_child = child
		add(child, "grow,push")
		revalidate()
	}
}
